home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
3D World 76
/
3DWI76.iso
/
pc
/
Tutorials
/
qa_minis
/
XSI QA
/
Model_rendering.js
< prev
next >
Wrap
Text File
|
2006-01-13
|
939b
|
25 lines
//Usage: Select all the models you want to render as separate images and run the script
//These lines creates a list of all your models and loop the script trough them
var oSel = GetValue("SelectionList")
for(i=0;i<oSel.Count;i++){
//This line creates the pass and gives it the same name as the current model
CreatePass(null, oSel(i).Name, null);
//This line sets the file name of the rendered picture to the same as the current model
SetValue("Passes."+oSel(i).Name+".RenderOptions.ImageFileName", "Render_Pictures\\"+oSel(i).Name, null);
// These lines turne of booth the render and viewport visibility for all the objects that are to be hidden.
SelectObj("Passes."+oSel(i).Name+".Background_Objects_Partition", null, null);
ToggleVisibility(null, null, null);
//These line creates a new partition containing the current model
SelectObj(oSel(i), "BRANCH", null);
CreatePartition(null, oSel(i).Name, null, null);
DeselectAll();
}